// import Cookies from 'js-cookie'
import storage from 'good-storage'
const TokenKey = 'Admin-Token'
const USER_MAIN_INFO = '__USER_INFO__'
export function getToken() {
  return storage.get(TokenKey)
}

export function setToken(token) {
  return storage.set(TokenKey, token)
}

export function removeToken() {
  return storage.remove(TokenKey)
}

export function setUserMainInfo(query) {
  return storage.set(USER_MAIN_INFO, query)
}

export function removeUserMainInfo() {
  storage.remove(USER_MAIN_INFO)
  return []
}

export function getUserMainInfo() {
  return storage.get(USER_MAIN_INFO, '')
}
